﻿
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

public class HideToggleBackground : MonoBehaviour
{
    /// <summary>
    /// toggle.targetGraphic
    /// </summary>
    Button buttonObj;
    [SerializeField]
   public GameObject bindObject;
    [SerializeField]
    bool isActive;
    public string CengJi="1";
    
    void Start()
    {
        buttonObj = GetComponent<Button>();
        buttonObj.GetComponent<Button>().onClick.AddListener(resultToggleChange);
    }
    void resultToggleChange()
    {
        if (CengJi != "")
        {
            RRClient.ins.Send(DataTypeEnum.LScreenAndRScreen, OrderTypeEnum.Home, CengJi);
        }
        
        if (bindObject != null)
        {
            bindObject.SetActive(isActive);
        }
    }

}
